package com.seanLab.repository;

import com.seanLab.domain.EditorSession;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.data.repository.CrudRepository;

/**
 * Created by ailly on 17-10-6.
 */

public interface EditorSessionRepo extends MongoRepository<EditorSession, String> {
    public EditorSession findBySessionID(String sessionID);

    //@Query("{'coverFlag':1}")
    public long countByCoverFlag(int coverFlag);

    public long countByAcceptFlag(int acceptFlag);

    public long countByTop1AcceptFlag(int top1AcceptFlag);

    public long countByTop5AcceptFlag(int top5AcceptFlag);

    public long countByIsTestFlagAndTop1AcceptFlag(int isTestFlag, int top1AcceptFlag);

    public long countByIsTestFlagAndTop1AcceptFlagAndTestLabel(int isTestFlag, int top1AcceptFlag, String testLabel);

    public long countByIsTestFlagAndCoverFlagAndTestLabel(int isTestFlag, int coverFlag, String testLabel);

    public long countByIsTestFlagAndAcceptFlagAndTestLabel(int isTestFlag, int acceptFlag, String testLabel);

    public long countByIsTestFlagAndTop5AcceptFlagAndTestLabel(int isTestFlag, int top5AcceptFlag, String testLabel);



}